﻿Imports System
Imports System.Collections

Public Class TipoDatoBE
#Region "Campos y Propiedades"
    Private _IdTipoDato As Integer
    Private _Nombre As String

    Public Property IdTipoDato() As Integer
        Get
            Return _IdTipoDato
        End Get
        Set(ByVal value As Integer)
            _IdTipoDato = value
        End Set
    End Property

    Public Property Nombre() As String
        Get
            Return _Nombre
        End Get
        Set(ByVal value As String)
            _Nombre = value
        End Set
    End Property


#End Region

#Region "Constructores"

    Public Sub New()

    End Sub

    Public Sub New(ByVal IdTipoDato As Integer, ByVal Nombre As String)
        Me._IdTipoDato = IdTipoDato
        Me._Nombre = Nombre
    End Sub
#End Region
End Class

Public Class TipoDatoBECollection
    Inherits CollectionBase

    Default Public Property Item(ByVal index As Integer) As TipoDatoBE
        Get
            Return CType(List(index), TipoDatoBE)
        End Get
        Set(ByVal value As TipoDatoBE)
            List(index) = value
        End Set
    End Property

    Public Function Add(ByVal value As TipoDatoBE) As Integer
        Return (List.Add(value))
    End Function

    Public Function IndexOf(ByVal value As TipoDatoBE) As Integer
        Return (List.IndexOf(value))
    End Function

    Public Sub Insert(ByVal index As Integer, ByVal value As TipoDatoBE)
        List.Insert(index, value)
    End Sub

    Public Sub Remove(ByVal value As TipoDatoBE)
        List.Remove(value)
    End Sub

    Public Function Contains(ByVal value As TipoDatoBE) As Boolean
        Return (List.Contains(value))
    End Function
End Class



